package com.xubeizhi.controller;

import com.xubeizhi.common.Result;
import com.xubeizhi.entity.User;
import com.xubeizhi.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/system/user")
@CrossOrigin
public class UserController {

    @Autowired
    private UserService userService;

    @PostMapping("/login")
    private Result login(@RequestBody User user){
        return userService.login(user);
    }
}
